import { axios } from '@/utils/request'

// 考察点列表
export function getList(params) {
  return axios({
    url: '/investigation',
    method: 'get',
    params
  })
}

// 考察点详情
export function getDetails(id) {
  return axios({
    url: `/investigation/${id}`,
    method: 'get'
  })
}

// 新建考察点
export function create(data) {
  return axios({
    url: `/investigation`,
    method: 'post',
    data
  })
}

export function update(id, data) {
  return axios({
    url: `/investigation/${id}`,
    method: 'put',
    data
  })
}

// 获取大师
export function getMaster(id) {
  return axios({
    url: `/investigation/${id}/master`,
    method: 'get'
  })
}

// 考察点新建大师
export function createMaster(id, data) {
  return axios({
    url: `/investigation/${id}/master`,
    method: 'post',
    data
  })
}